summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
index 07e65b028..d801db105 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/HomeViewModel.kt
@@ -3,6 +3,7 @@
package org.yuzu.yuzu_emu.model
+import android.net.Uri
import androidx.lifecycle.ViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
@@ -21,6 +22,12 @@ class HomeViewModel : ViewModel() {
private val _gamesDirSelected = MutableStateFlow(false)
val gamesDirSelected get() = _gamesDirSelected.asStateFlow()
+ private val _openImportSaves = MutableStateFlow(false)
+ val openImportSaves get() = _openImportSaves.asStateFlow()
+
+ private val _contentToInstall = MutableStateFlow<List<Uri>?>(null)
+ val contentToInstall get() = _contentToInstall.asStateFlow()
+
var navigatedToSetup = false
fun setNavigationVisibility(visible: Boolean, animated: Boolean) {
@@ -44,4 +51,12 @@ class HomeViewModel : ViewModel() {
fun setGamesDirSelected(selected: Boolean) {
_gamesDirSelected.value = selected
}
+
+ fun setOpenImportSaves(import: Boolean) {
+ _openImportSaves.value = import
+ }
+
+ fun setContentToInstall(documents: List<Uri>?) {
+ _contentToInstall.value = documents
+ }
}